/** * User Input phone number, judge whether reasonable or not? Ask, judge the length and judge the input is reasonable * Hide the user phone number in the middle of 4, * ideas: * *. With regular judgment conditions: Length 11-bit judgment there are two methods, regular {11} and Length () ==11. Input content with regular judgment * telephone
Regular expressions matching telephone numbers in php (location, live video number, and extension number supported)
This article introduces a regular expression for matching telephone numbers in php. For more information, see.Example of a regular expression for phone n
650) This. width = 650; "src =" https://mmbiz.qlogo.cn/mmbiz/ruQiaPclr2R1nTAEmV98iclib4FesuLyE4oAgpDRyIrrt7FLE0MvFuia1ia4iaLdJia7DicuiceZAIbOUNKXFneSOJ67Z2A/0 "style =" height: auto; "alt =" 0 "/>
As one of the most commonly used communication tools, telephone numbers not only play a fundamental role in real life, but also have a profound impact on the mobile Internet field. Particularly with the development of information technology from the PC Int
How to implement PHP regular expression matching telephone number a regular expression: 1. match mobile phone number, or whether it is with + 862. landline, 7 ~ 8-digit. it is also possible that the area code-telephone number-extension n
-generated constructor stubMc=new MyClass ();}Public Student GetInfo () {//constructor with parametersSystem.out.println ("Please enter the study number");String Id=sc.next ();System.out.println ("Please enter the telephone");int Tell=sc.nextint ();System.out.println ("Please enter name");String Name=sc.next ();Student stu=new Student (ID, tell, name);//data encapsulated into objects,return Stu; }public voi
Recently in a new project and the bank has an interface, the transfer needs to provide the bank name and line number, but the cooperative banks do not have the National Bank Bank name and line number data. (Say no, who believe Ah, is not willing to give, I find the province and head office results are the same as said no ... These bureaucrats.So I had to solve this problem by myself. All banks in the countr
The following two types of telephone number regular expressions are provided: js phone number verification and php Regular Expression verification. The following two types of telephone number regular expressions are provided: js phone nu
The checksum is all made up of numbers
Copy Code code as follows:
function IsDigit (s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec (s)) return false
return True
}
Verify Login Name: Can only enter 5-20 letters beginning with a letter, can be with numbers, "_", "." The string
Copy Code code as follows:
function Isregisterusername (s)
{
var patrn=/^[a-za-z]{1} ([a-za-z0-9]|[. _]) {4,19}$/;
if (!patrn.exec (s)) return false
return True
}
Format: Area code-Telephone (landline)/fax number-Extension number
(0) (2/3-digit-) 7/8-digit (-1 to 8-digit)
such as: 021-88888888-8888, 88888888, 88888888-88, 21-88888888, 0556-88888888, etc.
Writing a:
Writing two:
Determine whether it is a telephone number or not.
/*** Determine whether the mobile phone number is correct. * The number segment is allocated as follows: * Mobile: 134, 135, 136, 137, 138, 139, 150, 151 (TD), 158, 159, 187, 188 * China Unicom: 130, 131, 132, 152, 155, 156, 185, 186 * China Telecom: 133, 153, 180, 18
ASP to judge telephone number and email address program
Function IsValidEmail (email)Dim names, Name, I, CIsValidEmail = Truenames = Split (email, "@")If UBound (names) IsValidEmail = FalseExit FunctionEnd IfFor each Name in namesIf Len (Name) IsValidEmail = FalseExit FunctionEnd IfFor i = 1 to Len (Name)c = LCase (Mid (Name, I, 1))If InStr ("abcdefghijklmnopqrstuvwxyz_-.", c) IsValidEmail = FalseExit Func
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.